package org.finesys.common.file.properties;

import lombok.Data;
import org.finesys.common.file.client.ftp.FtpProperties;
import org.finesys.common.file.client.local.LocalFileProperties;
import org.finesys.common.file.client.oss.OssProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

/**
 * 存储文件配置信息
 */
@Data
@ConfigurationProperties(prefix = "file")
public class FileProperties {
    /**
     * 默认的bucketName
     */
    private String bucketName = "local";
    /**
     * oss 文件配置信息
     */
    @NestedConfigurationProperty
    private OssProperties oss = new OssProperties();

    /**
     * minio 文件配置信息
     */
    @NestedConfigurationProperty
    private OssProperties minio = new OssProperties();
    /**
     * 本地文件配置信息
     */
    @NestedConfigurationProperty
    private LocalFileProperties local = new LocalFileProperties();
    /**
     * ftp 文件配置信息
     */
    @NestedConfigurationProperty
    private FtpProperties ftp = new FtpProperties();
}
